package com.cloud.music.utils;

import cn.hutool.extra.spring.SpringUtil;
import com.alibaba.fastjson.JSONObject;
import com.cloud.music.dto.netease.CaptchaSent;
import com.cloud.music.service.netease.NeteaseCloudMusicService;

public class NeteaseMusicUtil {

    /**
     * 网易云音乐服务
     */
    private static final NeteaseCloudMusicService neteaseCloudMusicService = SpringUtil.getBean(NeteaseCloudMusicService.class);

    /**
     * 发送验证码
     * @param captchaSent 发送验证码请求参数
     * @return JSONObject
     */
    public static JSONObject captchaSent(CaptchaSent captchaSent) {
        return neteaseCloudMusicService.captchaSent(captchaSent);
    }

    /**
     * 发送验证码
     * @param params 发送验证码请求参数
     * @return JSONObject
     */
    public static JSONObject captchaSent(JSONObject params) {
        return neteaseCloudMusicService.captchaSent(params);
    }

}
